﻿<UserControl x:Class="VAdvantage.Controls.ToolBarButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
              xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
             
             >
    <Grid x:Name="LayoutRoot1">
        <vsm:VisualStateManager.VisualStateGroups>
            <vsm:VisualStateGroup x:Name="CommonStates">
                <vsm:VisualState x:Name="Normal"/>
                <vsm:VisualState x:Name="MouseOver">
                    <Storyboard >
                        <!--<DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Width"
								 To="28"/>
                        <DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Height"
								 To="28"/>-->
                        <DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"
								 To="1.0"/>

                        
                    </Storyboard>
                </vsm:VisualState>

                <vsm:VisualState x:Name="MouseLeave">
                    <Storyboard >
                        <!--<DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Width"
								 To="26"/>
                        <DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetProperty="Height" Storyboard.TargetName="LayoutRoot"
								 To="26"/>-->
                        <DoubleAnimation BeginTime="0:0:0" Duration="0:0:0.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LayoutRoot"
								 To="0.9"/>
                        
                    </Storyboard>
                </vsm:VisualState>
            </vsm:VisualStateGroup>
            <vsm:VisualStateGroup x:Name="SelectStates">
                <vsm:VisualState x:Name="Selected">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectVisual" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Visible</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
                <vsm:VisualState x:Name="UnSelected">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SelectVisual" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0">
                                <DiscreteObjectKeyFrame.Value>
                                    <Visibility>Collapsed</Visibility>
                                </DiscreteObjectKeyFrame.Value>
                            </DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
            </vsm:VisualStateGroup>
        </vsm:VisualStateManager.VisualStateGroups>

        <Border Grid.Row="0" x:Name="LayoutRoot" Margin="0"   BorderThickness="0" CornerRadius="0">
            <Border.Background>
                <ImageBrush x:Name="backgroundImageBrush"  ImageSource="/VAdvantage;component/Images/button_bg.png"></ImageBrush>
            </Border.Background>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Image x:Name="ToolItemBrush" Margin="3,0,0,0"  Stretch="None" VerticalAlignment="Center" ></Image>
                <TextBlock x:Name="txt" Text="Button" Margin="2,0,8,0" Grid.Column="1" VerticalAlignment="Center" ></TextBlock>
                    
            </Grid>
           
        </Border>
        <Border  x:Name="SelectVisual"  Opacity=".5" BorderThickness="0" Margin="1"  CornerRadius="2" Background="White" Visibility="Collapsed" />
    </Grid>
</UserControl>
